import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login/Login.vue'
import Reg from '../views/Reg/Reg.vue'

Vue.use(VueRouter)
 // 定义路由规则
 const routes = [
   {
    // 注册的路由
    path:'/reg',
    name:'reg',
    component: Reg
  },
  {
    // 登陆的路由
    path:'/login',
    name:'login',
    component: Login
  }, 
]
// 创建路由对象
const router = new VueRouter({
  routes
})

export default router
